package com.kuang.service.impl;

import com.kuang.dao.TypeMapper;
import com.kuang.dao.UserMapper;
import com.kuang.pojo.Type;
import com.kuang.service.TypeService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class TypeServiceImpl implements TypeService {
    @Autowired
    private TypeMapper typeMapper;

    @Override
    public List<Type> selectAllType() {
        return typeMapper.selectAllType();
    }

    @Override
    public Type selectTypeByName(String name) {
        return typeMapper.selectTypeByName(name);
    }

    @Override
    public int insertType(String name, Date updatetime, Date createtime) {
        return typeMapper.insertType(name, updatetime, createtime);
    }

    @Override
    public int deleteTypeById(Integer id) {
        return typeMapper.deleteTypeById(id);
    }

    @Override
    public int updateTyepById(Integer id, String name, Date updatetime) {
        return typeMapper.updateTyepById(id, name, updatetime);
    }

    @Override
    public List<Type> selectTypePage(Integer pageindex, Integer pagesize) {
        return typeMapper.selectTypePage(pageindex, pagesize);
    }

    @Override
    public int countType() {
        return typeMapper.countType();
    }

    @Override
    public Type selectTypeById(Integer id) {
        return typeMapper.selectTypeById(id);
    }

    @Override
    public List<Type> selectTypeListById(Integer typeid) {
        return typeMapper.selectTypeListById(typeid);
    }

    @Override
    public List<Type> selectTypeByKeyWords(String keywords) {
        return typeMapper.selectTypeByKeyWords(keywords);
    }


}
